Returns or sets the absolute row number of an rdoResultset object's current row.
Syntax
object.AbsolutePosition [= value]
The AbsolutePosition property syntax has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
value | A Long Data Type value from -1 to the maximum number of rows in the rdoResultset. Corresponds to the ordinal position of the current row in the rdoResultset specified by object. Default value is -1. |
Remarks
Use the AbsolutePosition property to position the current row pointer to a specific row based on its ordinal position in a keyset-, or static-type rdoResultset. It is not supported for dynamic or forward-only-type rdoResultset objects. While a value is returned for a dynamic cursor, the value is not necessarily accurate. Generally, the rdoResultset object's Bookmarkable property must be True before AbsolutePosition values are supported.
You can also determine the current row number by checking the AbsolutePosition property setting. For example, if you have populated 10 rows of a 50 row rdoResultset, the AbsolutePosition property returns 10. After you execute a MoveLast method against the result set, AbsolutePosition returns 50. You can then set the AbsolutePosition property to any value between 1 and 50 to position the current row pointer to that row.
The AbsolutePosition property value is -1 based thus a setting of 1 refers to the first row in the rdoResultset. Setting a value greater than the number of populated rows causes RDO to position to the last row in the result set (EOF).
If there is no current row, as when there are no rows in the rdoResultset, -1 is returned. If the current row is deleted, the AbsolutePosition property value isn't defined and a trappable error occurs if it is referenced. New rows are added to the end of the sequence if the type of cursor includes dynamic membership.
Note This property isn't intended to be used as a surrogate row number. Using bookmarks is still the recommended way of retaining and returning to a given position in a cursor. Also, there is no assurance that a given row will have the same absolute position if the rdoResultset is re-created because the order and membership of individual rows within an rdoResultset can vary between executions.